algebra substitution problems